package com.aiju.cash.ui.pay.manager;

/**
 * @author: 佐为
 * @date: 2017-04-12 13:26
 * @version: V1.0
 * @Description: 支付管理
 */
public class PayManager {

    public static final int FROM_PAY = 0; //收款模块跳转
    public static final int FROM_ORDER = 1; //开单模块跳转
    public static int PAY_FROM_TYPE = FROM_PAY; //支付来源

    /**
     * 设置为订单
     */
    public static void setOrderFrom() {
        PAY_FROM_TYPE = FROM_ORDER;
    }

    /**
     * 设置为收款
     */
    public static void setPayFrom() {
        PAY_FROM_TYPE = FROM_PAY;
    }
    /**
     * 是否是订单
     * @return
     */
    public static boolean isOrderFrom() {
        return PAY_FROM_TYPE == FROM_ORDER;
    }

    /**
     * 是否是收款
     * @return
     */
    public static boolean isPayFrom() {
        return PAY_FROM_TYPE == FROM_PAY;
    }
}
